﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;

namespace si.caha.Model
{
    public class Category
    {
        [Key]
        public int CategoryId { get; set; }

        [Required]
        public int Level { get; set; } 

        [Required]
        public int CategoryParentId { get; set; }

        [Required]
        [StringLength(200)]
        public string Title { get; set; }

        public string GetUrlTitle()
        {
            return Title.Replace(" ", "-");
        }
    }
}